package com.san.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

import java.util.Date;
/**
 * 系统日志DO
 */
@Data
public class LogDO {
	private Long id;
	
	/**
	 * 操作员ID
	 */
	private Long userId;
	
	/**
	 * 操作员名称
	 */
	private String username;
	
	/**
	 * 操作内容
	 */
	private String operation;
	
	/**
	 * 响应时间
	 */
	private Integer time;
	
	/**
	 * 请求方法
	 */
	private String method;
	
	/**
	 * 请求参数
	 */
	private String params;
	
	/**
	 * 请求IP
	 */
	private String ip;
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	
	/**
	 * 请求时间
	 */
	private Date createDate;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username == null ? null : username.trim();
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation == null ? null : operation.trim();
	}

	public Integer getTime() {
		return time;
	}

	public void setTime(Integer time) {
		this.time = time;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method == null ? null : method.trim();
	}

	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params == null ? null : params.trim();
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip == null ? null : ip.trim();
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Override
	public String toString() {
		return "LogDO{" +
				"id=" + id +
				", userId=" + userId +
				", username='" + username + '\'' +
				", operation='" + operation + '\'' +
				", time=" + time +
				", method='" + method + '\'' +
				", params='" + params + '\'' +
				", ip='" + ip + '\'' +
				", createDate=" + createDate +
				'}';
	}
}